
import Taro, { Component, Config } from '@tarojs/taro'
import { View, Image } from '@tarojs/components'
import { observer, inject } from '@tarojs/mobx'
import {IStoreProps} from '../../store/Stores'
import { } from '../../utils/common'

import './vr.scss'
import vr from '../../assets/img/bg_01.jpg'

// require('../../assets/aframe/aframe-master')

interface IHomeProps extends IStoreProps {}

@inject("stores")
@observer
class Vr extends Component<IHomeProps> {
  componentWillMount () {
    Taro.setNavigationBarTitle({ title: '鱼塘VR' })
  }

  config: Config = {
    navigationBarTitleText: '鱼塘VR'
  }

  componentDidShow(): void {
    Taro.setNavigationBarTitle({ title: '鱼塘VR' })
  }

  render () {
    let vr = false
    return (
      <View className='vr page-bg'>
        {
          vr&&
          <View className='vr-wrap'>
              <Image className='vr-bg' src={vr} />
              <a-scene>
                  <a-sky src={require("../../assets/aframe/puydesancy.jpg")} rotation="0 -130 0"></a-sky>

                  <a-text font="kelsonsans" value="Puy de Sancy, France" width="6" position="-2.5 0.25 -1.5"
                          rotation="0 15 0"></a-text>
              </a-scene>
          </View>
        }
        {
          !vr&&
          <View className='none'>
              <Image className='none__icon' src={require('../../assets/img/common/none.png')} />
              <View className='none__desc desc'>系统正在加紧研发中，敬请期待...</View>
          </View>
        }
      </View>
    )
  }
}

export default Vr
